/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author Ekaterina
 */

@Entity
@Table (name = "military", catalog = "otdelkadrov", schema = "")

public class Military implements Serializable{
  
    
@Column(name = "groups")
private String groups;
@Column(name = "category")
private String category;
@Column(name = "struct")
private String struct;

@Column(name = "rank")
private String rank;

@Column(name = "spec_number")
private int spec_number;

@Column(name = "ifable")
private String ifable;

@Column(name = "name_bystreet")
private String name_bystreet;

@Column(name = "name_address")
private String name_address;

@Column(name = "spec_oblic")
private String spec_oblic;

@Id
@GeneratedValue
@Column (name="id")
private Integer id = null;

@OneToOne
@JoinColumn(name = "worker",referencedColumnName = "id")
private Worker worker;

    public void setGroups(String groups) {
        this.groups = groups;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public void setStruct(String struct) {
        this.struct = struct;
    }

    public void setRank(String rank) {
        this.rank = rank;
    }

    public void setSpec_number(int spec_number) {
        this.spec_number = spec_number;
    }
    
    public void setIfable(String ifable) {
        this.ifable = ifable;
    }

    public void setName_bystreet(String name_bystreet) {
        this.name_bystreet = name_bystreet;
    }

    public void setName_address(String name_address) {
        this.name_address = name_address;
    }

    public void setSpec_oblic(String spec_oblic) {
        this.spec_oblic = spec_oblic;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    
       public void setWorker(Worker worker) {
        this.worker = worker;
    }

    public String getGroup() {
        return groups;
    }

    public String getCategory() {
        return category;
    }

    public String getStruct() {
        return struct;
    }

    public String getRank() {
        return rank;
    }

    public int getSpec_number() {
        return spec_number;
    }
    
     public String getIfable() {
        return ifable;
    }

    public String getName_bystreet() {
        return name_bystreet;
    }

    public String getName_address() {
        return name_address;
    }

    public String getSpec_oblic() {
        return spec_oblic;
    }

    public Integer getId() {
        return id;
    }
    
       public Worker getWorker() {
        return worker;
    }

    
}
